<template>
	<div class="school">
		<h1>我是School组件</h1>
		<h2>校名：{{name}}</h2>
		<h2>地址：{{address}}</h2>
		<button @click="showInfo">点我展示学校信息</button>
	</div>
</template>

<script>
	export default {
		name:'School',
		data() {
			return {
				name:'尚硅谷',
				address:'宏福科技园'
			}
		},
		methods: {
			showInfo(){
				alert(`校名：${this.name}，地址${this.address}`)
			}
		},
	}
</script>

<style>
	.school{
		background-color: green;
		padding: 10px;
	}
</style>